//
//  HBHotCoinChartUtils.h
//  FindClass
//
//  Created by tianlong on 2024/12/4.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

#define HotCoinChartXAxisSections 5 //横轴上固定显示5个值

@interface HBHotCoinChartUtils : NSObject

/// 根据点位划线
/// - Parameters:
///   - view: 要划线的视图
///   - points: 点位信息集合
+ (void)drawCurveInView:(UIView *)view
             withPoints:(NSArray *)points
             curveColor:(UIColor *)color
              lineWidth:(CGFloat)width;

+ (CALayer *)drawCircleInView:(UIView *)view
                  centerPoint:(CGPoint)centerPoint
                       radius:(CGFloat)radius
                    fillColor:(UIColor *)fillColor
                  borderColor:(UIColor *)borderColor
                  borderWidth:(CGFloat)width;
+ (void)drawLineChartInView:(UIView *)view
                 dataPoints:(NSArray<NSDictionary *> *)dataPoints
                  lineColor:(UIColor *)lineColor
                  lineWidth:(CGFloat)lineWidth;


/// 按固定算法返回5个值：头、中、尾、头<-->中的中，中<-->尾的中
/// - Parameters:
///   - array: 原数组
+ (NSArray *)findElementsFromArray:(NSArray *)array;

+ (UIColor *)randomColor;

@end

NS_ASSUME_NONNULL_END
